import request from '@/utils/request'

export default {

    //带条件的分页查询
    getTeacherPageVo(current, limit, teacherQuery) {
        return request({
            url: `/eduservice/eduteacher/getTeacherPageVo/${current}/${limit}`,
            method: 'post',
            data: teacherQuery //转化json传递
        })
    },
    //根据删除讲师
    delTeacherById(id) {
        return request({
            url: `/eduservice/eduteacher/${id}`,
            method: 'delete',
        })
    },
    //新增讲师
    addTeacher(eduTeacher){
        return request({
            url: `/eduservice/eduteacher/addTeacher`,
            method: 'post',
            data: eduTeacher   //转化json传递
        })
    },
    //根据id查询数据，做回显
    getTeacherById(id){
        return request({
            url: `/eduservice/eduteacher/getTeacherById/${id}`,
            method: 'get'
          })
    },
    //执行修改操作
    updateTeacher(eduTeacher){
        return request({
            url: `/eduservice/eduteacher/updateTeacher`,
            method: 'post',
            data: eduTeacher   //转化json传递
        })
    },
    // 查询所有讲师
    getAllTeacher(){
        return request({
            url: `/eduservice/eduteacher`,
            method: 'get',
        })
    }
}